<div class="company_info">
<?
    Principio_Library_Common::printErrorsAndMsg();
?>
	<div class="company_info_item">
		<div class="subtitle">
			General Settings:
		</div>
		<div>
			<textarea id="ext0_template"><?=$this->model_spa_ext_templates->getTemplate(0) ?></textarea>
		</div>
	</div>
<?
    for ($i = 1; $i < $this->model_spa_ext_templates->getExts(); $i++)
	{
?>
    <div class="company_info_item">
        <div class="subtitle">
            Template for Ext <?=$i ?>:
        </div>
        <div>
            <textarea id="ext<?=$i ?>_template"><?=$this->model_spa_ext_templates->getTemplate($i) ?></textarea>
        </div>
    </div>
    <br>
<?
	};
?>
    <table border="0" width="100%" class="buttons">
        <tr>
            <td align="right">
                <input class="save" type="submit" name="apply" value="Apply changes" onClick="ajaxSpa({action: 'customize', container: 'container', id: <?=$this->model_spa_ext_templates->getID() ?>, templates_count: <?=$this->model_spa_ext_templates->getExts() ?>, no_refresh: true})"/>
				<input class="cancel" type="submit" name="reset" value="Reset" onClick="ajaxSpa({id: <?=$this->model_spa_ext_templates->getID() ?>, container: 'container', action: 'customize', no_apply: true}); return false;" />
            </td>
        </tr>
    </table>
</div>